package com.qf.day12.generic;

public class Teacher extends Person{

    private Double salary;

    public Teacher() {
    }

    public Teacher(String name, Double salary) {
        super(name);
        this.salary = salary;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "salary=" + salary +
                "} " + super.toString();
    }
}
